package exception;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemoZUOYE {
    public static void main(String[] args) {
        System.out.println("开始");
        try (
                FileOutputStream fos = new FileOutputStream("fos.ww");
        ) {
            fos.write(1);
        }catch(IOException q){
            q.printStackTrace();
        }
            System.out.println("程序结束");
        }
    }

